﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataMappers;
using ExaminationTT.Model;

namespace ConcreteMappersAndObjects.DomainObjects
{
    public class Room : DomainObject<int, Room> , IRoom
    {
        private string _description;
        private int _seats;
        protected override Room Self()
        {
            return this;
        }

        public Room() : base() { }
        public Room(int ID, string description, int seats) : base(ID)
        {
            _description = description;
            _seats = seats;
        }
        #region IRoom Members


        public string Description
        {
            get { return _description; }
            set { _description = value; MarkDirty(); }
        }

        public int Seats
        {
            get { return _seats; }
            set
            {
                if (_seats != value)
                {
                    _seats = value;
                    MarkDirty();
                }
            }
        }

        
        #endregion

    }
}
